#include "drv_seg.h"
#include "drv_spi.h"
#include "drv_systick.h"
static uint8_t seg_wei[]={0x08,0x04,0x02,0x01};
static uint8_t seg_code[]={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F};//0-9

void drv_74hc595_init(void)
{
	drv_spi2_init();
}
void drv_seg_display(uint8_t wei,uint8_t duan)
{
	drv_spi2_senddata(seg_wei[wei]);
	drv_spi2_senddata(seg_code[duan]);
	GPIO_ResetBits(GPIOB,GPIO_Pin_12);
	drv_systick_ms(1);
	GPIO_SetBits(GPIOB,GPIO_Pin_12);

}

